#ifndef TC_GLOBAL_H
#define TC_GLOBAL_H

/** \file Global.h 
 * The global C header file for the project.
 *
 * (C) Copyright  Semih Cemiloglu
 * All rights reserved, see COPYRIGHT file for details.
 *
 * $Id: Global.hh 111 2006-06-19 03:45:40Z semihc $
 *
 *
 */

/* Determine platform */
#if defined(__unix)
#  if defined(__sun)
#    define TC_PLAT __sun
#    define TC_PLAT_Sun 1
#  elif defined(__linux)
#    define TC_PLAT __linux
#    define TC_PLAT_Linux 1
#  endif
#elif defined(_WIN32)
#    define TC_PLAT _WIN32
#    define TC_PLAT_Win32 1
#else
#  error Unknown platform
#endif


/* Include Platform-specific configuration headers: */
#ifdef TC_PLAT_Linux
# include "ConfigLinux.h"
#endif

#ifdef TC_PLAT_Sun
# include "ConfigSun.h"
#endif

#ifdef TC_PLAT_Win32
# include "ConfigWin32.h"
#endif

//! Function name in char* format
//! If not defined make it null
#ifndef TC_FUNCTION
# define TC_FUNCTION 0
#endif

//! Portable (compile-time) __TIMESTAMP__ implementation
#define TC_TIMESTAMP  __DATE__ " " __TIME__

//! Concatenation of two symbols
#define TC_CATENATE(A,B)  A##B

//! String-ification of a given symbol
#define TC_STRINGIFY(A)   #A

//! Required if the A itself is a macro (__LINE__ case)
#define TC_MACRO2STRING(A) TC_STRINGIFY(A)
#define TC_MACROEVAL(A) A

//! Create pragma directive (C99 standard)
#define TC_DO_PRAGMA(x) _Pragma (#x)


#endif /* TC_GLOBAL_H */
